package com.ruoyi.business.service.impl;

import com.ruoyi.business.domain.Customer;
import com.ruoyi.business.mapper.CustomerMapper;
import com.ruoyi.business.service.CustomerService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private CustomerMapper customerMapper;

    @Override
    public List<Customer> queryCustomer(Customer customer) {
        return customerMapper.queryCustomer(customer);
    }

    @Override
    public int insertCustomer(Customer customer) {
        return customerMapper.insertCustomer(customer);
    }

    @Override
    public Customer selectCustomerById(Long id) {
        return customerMapper.selectCustomerById(id);
    }

    @Override
    public int updateCustomer(Customer customer) {
        return customerMapper.updateCustomer(customer);
    }

    @Override
    public int deleteCustomerByIds(String ids) {
        return customerMapper.deleteCustomerByIds(Convert.toStrArray(ids));
    }
}
